<template>
<div class="search-common" v-loading="loading">
     <el-row class=" pt10">
         默认小喇叭
      </el-row>
 <el-tabs v-model="activeName2" type="card" @tab-click="handleClick" class="mt20">
    <el-tab-pane label="规则" name="first">
<el-table
      :data="tableData"
      border
      size="mini"
      style="width: 100%">
      <el-table-column
        prop="soft"
        label="序号"
       >
      </el-table-column>
      <el-table-column
        prop="event"
        label="触发事件"
        >
      </el-table-column>
      <el-table-column
        prop="scope"
        label="接收范围">
      </el-table-column>
       <el-table-column
        prop="content"
        label="内容">
      </el-table-column>
        <el-table-column
        prop="count"
        label="循环次数">
      </el-table-column>
    </el-table>



    </el-tab-pane>
    <el-tab-pane label="日志" name="second">
      
 <el-table :data="logg" border size="mini" style="width: 100%">

 <el-table-column width="100px"    label="编号">
        <template slot-scope="scope">
               {{scope.$index+1}}
             </template>
        </el-table-column>

        <el-table-column width="100px"  prop="scope" label="发布范围">
           <template slot-scope="scope">
               {{scope.row.scope=='0'?'全体':(scope.row.scope=='1'?'讲师':'其他')}}
             </template>
        </el-table-column>
   
          <el-table-column width="120px"   label="经纪商">
             <template slot-scope="scope">
            {{scope.row.agent_num | filterAgent}}
             </template>
        </el-table-column>
        <el-table-column prop="content"  label="内容">
        </el-table-column>
          <el-table-column prop="play_count"  width="100px" label="循环次数">
        </el-table-column>


          <el-table-column prop="create_time" width="170px"   label="发布时间">
        </el-table-column>
        <!-- <el-table-column prop="address" label="操作" style="width:10%;">
          <template slot-scope="scope">
              <el-button  type="text" size="small" @click="$router.push({name:'menu_notice_add',query:{id:scope.row.id}})">编辑</el-button>
            <el-button  type="text" size="small" @click="opeationNotice(scope.row)">
             
           {{(scope.row.status=='0'?'发布':scope.row.status=='1'?'停用':scope.row.status=='2'?'启用':'其他')}}
            </el-button>
          </template>
        </el-table-column> -->
      </el-table>



<page-pagination 
      v-on:pageFun="pageFunNumber" 
      :page="page" 
      :pageSize="pageSize" 
      :total="total">
    </page-pagination>

    </el-tab-pane>
  </el-tabs>
</div>
</template>

<script>
import pagePagination from "@/components/Common/pagePagination";
import server from "@/service/index_c";
export default {
  components:{
    pagePagination
  },
  data() {
    return {
      loading:false,
      activeName2: "first",
      tableData: thrumpet,
      page: 1,
      pageSize: 15,
      logg: [],
      total: 0
    };
  },
  mounted() {
    this.queryDefaultLogge();
  },
  methods: {
    handleClick(tab, event) {
    },
    async queryDefaultLogge(page = 1) {
      this.loading=true;
      let res = await server.haibeiDefaultTurmpetItem({
        page: page,
        pageSize: this.pageSize
      });
      if (res.success) {
        this.logg = res.result.pageList;
        this.page = res.result.page;
        this.total = res.result.nums;
        this.loading=false;
      }
    },
    pageFunNumber(page) {
      this.queryDefaultLogge(page);
    }
  }
};
</script>

<style scoped>

</style>